package com.geek.javase.ch04.test2;

/*
 *@author wangpeng
 *2025/10/12 21:04
 *@description TODO
 */
public class Manager extends Employee implements Add{
    private String level;
    //子实现类，重写接口的方法
    @Override
    public void add(){
        System.out.println("Manager涨工资前："+getWage());
        setWage(getWage()+getWage()*0.2);
        System.out.println("Manager涨工资后："+getWage());
    }

    public Manager() {
    }

    public Manager(String name, String address, String ID, double wage, int workAge, String level) {
        super(name, address, ID, wage, workAge);
        this.level = level;
    }

    //重写toString()方法
    @Override
    public String toString() {
        return "Manager{" +
                "level='" + level + '\'' +
                '}';
    }
}
